home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 11
/
FM Towns Free Software Collection 11.iso
/
t_os
/
data
/
dora
/
doradnld.plp
< prev
next >
Wrap
Text File
|
1995-08-15
|
13KB
|
519 lines
/* ダウンロード制御ファイル指定の有無の判定処理 */
%AUTODNLD{
footnote({ダウンロード制御ファイル指定の有無を判定しています});
case (@filechk(UP2|{doradown.ctl}),
{Yes},
{footnote({自動ダウンロード処理を行います});
AUTOdown(UP2|{doradown.ctl});
delfile(UP2|{doradown.bak});
renname(UP2|{doradown.ctl},{doradown.bak});
case (@filechk(UP2|{doradown.rsv}),
{Yes},
{renname(UP2|{doradown.rsv},{doradown.ctl})}
);
});
};
/*ダウンレート計算処理ステップ1*/
%RTtime {[datafile]
dispoff(!DEBUG);
command(CDIR2|{escctr -d}|TEMP2|{ -K}|TEMP2|{ }|TEMP2|{_rattxt.tmp});
dispoff({No});
var n[2];var Fsize[10];n:={0};
%Gfsize @read(TEMP2|{_rattxt.tmp});
Fsize:=@head(Gfsize,{数 :},{ (})*128;im({No});
BRTtime(datafile);
};
/* ダウンロード成功処理 */
%yatta1 {[datafile]
%Gfsize @laststr(128);
DOWNSTOP;delfile(TEMP2|{_rattxt.tmp});
write(TEMP2|{_rattxt.tmp},Gfsize);
dispoff(!DEBUG);mkdir2(@body(datafile,,{\}));dispoff({No});
loop ({
wait (3,{im({Yes})}
,{ファイルの補足説明を表示しますか},
{
type({Y\n});dispoff(!DEBUG);mkdir2(@body(docfile,,{\}));
dispoff({No});DOWNCHECK;receive(docfile);
wait(Wtime2,,{Protocol},);
WaitMK;DOWNSTOP;im({No})
}
,{補足説明:},
{
dispoff(!DEBUG);mkdir2(@body(docfile,,{\}));
dispoff({No});DOWNCHECK;receive(docfile);
wait(Wtime2,,{項目},);DOWNSTOP;
wait(Wtime2,,{Protocol},);
WaitMK;im({No})
}
,{説明はありません},{im({Yes})}
,{Protocol},
{WaitMK;im({No})}
);
});
type(binop|{\n});
wait (3, {
%timeP @linetime;
RECbin(datafile);type({\n});
wait(WtimeD,{otto3},
{,Q},{WaitMK;type({Q\n})},
{,?,0},{WaitMK;type({0|Q\n})});
%timePS @linetime-timeP-8;
RTtime(datafile);
}
,{で止める},
{
%timeP @linetime;
RECbin(datafile);type({\n});
wait (WtimeD,{otto3},
{,Q},{WaitMK;type({Q\n})},
{,?,0},{WaitMK;type({0|Q\n})});
%timePS @linetime-timeP-8;
RTtime(datafile);
}
,{で中断},
{
%timeP @linetime;
RECbin(datafile);type({\n});
wait (WtimeD,{otto3},
{,Q},{WaitMK;type({Q\n})},
{,?,0},{WaitMK;type({0|Q\n})});
%timePS @linetime-timeP-8;
RTtime(datafile);
}
,{失敗し},{otto3}
,{ボードの指定が違います},
{display({データ番号が違うため次の処理を行います\n});otto3}
);
DOWNSTART;
};
/* ダウンロード不成功処理 */
%otto3 {
SNDMSG({okasi_f.snd});
write(UP2|{doradown.rsv},{保留;}|linebuf);
wait (Wtime2,,
{,?,Q},{WaitMK;type({Q\n})},
{,0,Q},{WaitMK;type({Q\n})},
{,?,0},{WaitMK;type({0|Q\n})},
{Operation},{WaitMK;type({Q|0|Q\n})});
im({No})
};
/* ダウンロード実行の判定 */
%GOyatta{[dataname,datafile]
wait(Wtime2,{type(dataname|{\n})},
{[RET]},{type(dataname|{\n})});
loop ({
wait (3,{im({Yes})}
,{ファイルが見つか},{otto3;im({No})}
,{参照数},{yatta1(datafile);im({No})}
,{登録者},{yatta1(datafile);im({No})}
,{送信者},{yatta1(datafile);im({No})}
);
});
im({No})
};
/* ダウンロード処理 */
%DLIBDOWN{
[forum,libno,dataname,docfile,datafile]
/* ダウンロード実行処理 */
footnote(libno|{番ライブラリの}|dataname|{をダウンロードします});
type({\n});WaitMK;
loop ({
wait(3,{type({\n});im({Yes})}
,{>>},{
case (forum=NET,
{Yes},{type({F#}|libno|{|D\n})},
{No},{type({F#}|libno|{|}|forum|{|D\n})}
);im({No})}
,{MAIN},{WaitMK;
case (forum=NET,
{Yes},{type({F#}|libno|{|D\n})},
{No},{type({F#}|libno|{|}|forum|{|D\n})}
);
});
});
loop ({
wait(3,{im({Yes})}
,{このボードではダウンロードは出来ません。},
{display({ダウンロードが禁止されている為、次の処理を行います\n});
SNDMSG({okasi_f.snd});
wait(Wtime2,,{,?,0},{type({0|Q\n})});im({No})
}
,{ポイント不足},{otto3}
,{ダウンロード制限},{otto3}
,{そのボードには入れ},{otto3}
,{ボードが見つか},{otto3}
,{,?,0},{type({\n});otto3}
,{ファイルが見つか},{otto3}
,{パスワードが違います},{otto3}
,{ファイル名は},{WaitMK;GOyatta(dataname,datafile)}
,{ファイル名を入力},{WaitMK;GOyatta(dataname,datafile)}
,{DOWNLOAD},{WaitMK;GOyatta(dataname,datafile)}
);
});
};
/* メンバー全員のプロフィールダウン処理 */
%ALLPRO{
type({P|L\n});
loop ({
wait (3,{im({Yes})},
{始めのIDは?},
{
footnote({メンバー全員のプロフィールダウンします});
mkdir2(LOG2|{PROFILE});
DOWNCHECK;delfile(LOG2|{PROFILE\profile.dat});
WaitMK;type({\n});
receive(LOG2|{PROFILE\profile.dat});
loop ({
wait (3,{im({Yes})},
{,?,0},{WaitMK;type({0\n});im({No})},
{MAIN},{im({No})}
)
});
DOWNSTOP;DOWNSTART;im({No})
});
});
};
/* プロフィールダウンロード処理 */
%PROFDOWN{
[uid]
var UID[90];
footnote(uid|{の}|{プロフィール情報をダウンロードします});
dispoff(!DEBUG);mkdir2(LOG2|{profile});dispoff({No});
UID:=uid;
loop ({
%id1 @head(UID,{,});
UID:=@body(UID,{,});
dispoff(!DEBUG);
command({del }|LOG2|{profile\}|id1|{.prf});
dispoff({No});DOWNCHECK;
receive(LOG2|{profile\}|id1|{.prf});
type({P|P}|id1);type({\n});
loop ({
wait(3,{im({Yes})},
{) >},{type({0|Q\n});
wait(3,,{,?,O},{},{[N]},{type({\n})});
im({No})});
});
DOWNSTOP;DOWNSTART;
case(UID,{},{im({No})},,{im({Yes})});
});
};
/* ファイルボードの最新登録状況を見る処理 */
%FILBORD{ [lib]
footnote({ファイルボード}|lib|{の最新登録状況を見ます});
mkdir2(LOG2|{DATALIB});
delfile(LOG2|{DATALIB\#}|lib|{DLIB.DAT});
WaitMK;type({F#}|lib|{\n});
LIBprom1(lib,NET);
};
/* データライブラリからの自動ダウンロード処理 */
%AUTOdwn1{
%CdirD @getcdir;
case (@head(linebuf,{=}),
{forum},
{DLIBDOWN(
@tail(linebuf,{forum=},{;}),
@tail(linebuf,{libno=},{;}),
@tail(linebuf,{dataname=},{;}),
@tail(linebuf,{docfile=},{;}),
@tail(linebuf,{datafile=},{;}));
im({Yes});
},
{allprofile},{ALLPRO;im({Yes})},
{profile},{PROFDOWN(@tail(linebuf,{profile=},{;}));im({Yes})},
{filbord},{FILBORD(@tail(linebuf,{filbord=},{;}));im({Yes})},
{},{im({No})},
,{im({Yes})}
)
};
%AUTOdown{
[file]
case (@filechk(file),
{Yes},
{
line:=0;
loop ({
line:=line+1;
linebuf:={};
linebuf:=@read(file,line,1);
case (@getchar(linebuf,1,5)={保留;},
{Yes},
{write(UP2|{doradown.rsv},linebuf);im({Yes})},
{No},
{AUTOdwn1},
);
});
AUTOdwn1;
},
{No},
{
SNDMSG({okasi_f.snd});
display({\n}|file|{制御ファイルがありません\n});
});
};
/* バイナリメールのダウン と 削除 */
%downBML{
footnote({メール処理実行中});
WaitMK;type(BINop|{\n});
wait(3,,{メール},,{送信は},,{MAIL},);
delfile(TEMP2|{_bmaltxt.tmp});type({\n});
loop ({
wait(5,{im({Yes});type({\n})},
{Protocol},{WaitMK;retMAIN;SKIP},
{メイン},{WaitMK;retMAIN;SKIP},
{メイン},{WaitMK;retMAIN;SKIP},
{MAIN},{WaitMK;retMAIN;SKIP},
{ヘルプ 表示},{WaitMK;retMAIN;SKIP},
{してねっ☆},{WaitMK;retMAIN;SKIP},
{MAIL},{WaitMK;type({L\n});im({No})});
});
wait(3,,{姫子},{}
,{from top},,{------},,{ワイルドカード},);
type({\n});
DOWNCHECK;receive(TEMP2|{_bmaltxt.tmp});
wait (Wtime2,,{MAIL},);
DOWNSTOP;DOWNSTART;
dispoff(!DEBUG);
command(CDIR2|{escctr -d}|TEMP2|{ -K}|TEMP2|{ }|TEMP2|{_bmaltxt.tmp});
dispoff({No});
case (@filechk(TEMP2|{_bmaltxt.tmp})={},
{Yes},{footnote({Bメールデータリストの読み込みに失敗しました})},
{No},{footnote({Bメールデータリストの読み込みに成功しました})}
);
BREDsyor;
};
/*DAWN前処理*/
%BREDsyor{
var Bchk[2000];var BMflag[3];
%comA{存在しま};%comB{はない};%comC{はあり};
%comD{.LZH\n};%comE{.JPG\n};%comF{がありません};
%ckBMail{var n[2]; n:=0;var N[2]; N:=@noline(Bchk);
footnote({Bメールリストの確認処理を開始します});
loop ({ n:=n+1;
%a @getline(Bchk,n,1);BMflag:={};
case (n>N,
{Yes},{im({No})},,
{
case (BINop={M},
{Yes},
{case (a={} || @exist(a,comD)={No}
&& @exist(a,comE)={No},
{Yes},{im({Yes})},,
{footnote(@tail(a,{ },{\n})|
{ファイル確認しました});
ckBMail2;
im({Yes})
})
},,
{case (a={},
{Yes},{im({Yes})},,
{footnote({BMAIL確認中です});
ckBMail2;
im({Yes})
})
});
});
});
footnote({Bメールの読み込み処理を終了しました});
};
%ckBMail2{
case (@exist(a,ID),
{No},{im({Yes})},
{Yes},
{
case (
BINop={Z}&&@getchar(a,46,1)={.}
&&@strip(@head(@getchar(a,6,9),{ }))<>ID
||
BINop={M}&&@getchar(a,41,1)={b}
&&@strip(@head(@getchar(a,6,9),{ }))<>ID
||
BINop={M}&&@getchar(a,42,1)={b}
&&@strip(@head(@getchar(a,6,9),{ }))<>ID
||
BINop={MB}
&&@getchar(a,46,1)={.}
&& @strip(@head(@getchar(a,6,9),{ }))<>ID
||
BINop={MB}
&&@getchar(a,42,17)={-----------------}
&& @strip(@head(@getchar(a,6,9),{ }))<>ID
||
BINop={MB}
&& @getchar(a,26,17)={-----------------}
&& @strip(@head(@getchar(a,6,9),{ }))<>ID,
{Yes},{BdwnLOD(a);BMflag:={DEL}});
case (BMALDEL={Yes}&& UnDele<>{Yes} && BINop<>{M},
{Yes},{BDELsyori(a,BMflag);UnDele:={No}}
)
});
};
Bchk:=@read(TEMP2|{_bmaltxt.tmp});
case (@exist(Bchk,comA)||@exist(Bchk,comB)
||@exist(Bchk,comC)||@exist(Bchk,comF),
{Yes},{footnote({バイナリメールは存在しません})},
{No},{footnote({Bメールの読み込み処理を開始します});ckBMail});
preRetM;
};
/*DAWN処理*/
%BdwnLOD{[a]
var Fsize[10];var datafile[64];var docfile[64];var name[30];
%Bytes @tail(@head(a,{KB}),{ });
Fsize:= @tail(@head(a,{KB}),{ })*128;
case (BINop,
{Z},{name:=@strip(@body(a,{ B },Bytes))},
{M},{name:=@tail(a,{ },{\n})},
{MB},
{case (@getchar(a,52,1)={.},
{Yes},{name:=@strip(@getchar(a,44,12))},
{No},{name:=@strip(@getchar(a,60,8))|
@getchar(a,68,4)
});
});
datafile:=LOG2|{BMAIL\}|name;
docfile:=LOG2|{BMAIL\}|@body(name,,{.})|{.ggg};
dispoff(!DEBUG);display(name);mkdir2(@body(docfile,,{\}));dispoff({No});
type(@getchar(a,2,3)-BNo|{\n});DOWNCHECK;
case (@exist(name,{.}),{Yes},
{
case (BINop,
{M},
{delfile(TEMP2|{_size.tmp});
wait (Wtime2,
,{RET},{receive(TEMP2|{_size.tmp})}
,{ファイル名},{receive(TEMP2|{_size.tmp})}
,{File},{receive(TEMP2|{_size.tmp})});
%fsize @tail(@read(TEMP2|{_size.tmp}),{= },{ bytes}); case (@exist(fsize,{,}),
{Yes},
{Fsize:=@conma(fsize)},
{No},{Fsize:=fsize}
);
},
,{receive(docfile)});
});
loop ({
wait (3,{im({Yes})}
,{Protocol},{im({No})}
,{[32minary},{type({B\n});im({No})}
,{B:inary},{type({B\n});im({No})}
)
});
WaitMK;DOWNSTOP;DOWNSTART;type(binop|{\n});
wait ({5}, {
%timeP @linetime;RECbin(datafile);
%timePS @linetime-timeP-8;
type({\n});BRTtime(datafile);
wait (WtimeD,,
{MAIN},,
{MAIL},,
{Mail},,
{成功},)
}
,{で中断},
{
%timeP @linetime;RECbin(datafile);
%timePS @linetime-timeP-8;
type({\n});BRTtime(datafile);
wait (WtimeD,,
{MAIN},,
{MAIL},,
{Mail},,
{成功},);
}
,{失敗し},{UnDele:={Yes}}
,{ボードの指定が違います},
{display({データ番号が違うため次の処理を行います\n})}
);im({Yes})
};
/*削除処理*/
%BDELsyori{[a,BMflag]
var name[30];var BmNo[3];
%Bytes @tail(@head(a,{KB}),{ });
footnote({Bメールの削除処理をします。>削除モード=}|DelBML);
case (BINop,
{Z},{name:=@strip(@body(a,{ B },Bytes))},
{MB},
{case (@getchar(a,52,1)={.}||@getchar(a,52,1)={o},
{Yes},{name:=@strip(@getchar(a,44,12))},
{No},{
case (@getchar(a,46,1)={.}||@getchar(a,46,1)={o},
{Yes},{name:=@strip(@getchar(a,2,3)-BNo)},
{No},{name:=@strip(@getchar(a,60,8))|
@getchar(a,68,4)
});
});
});
BmNo:=@strip(@getchar(a,2,3));
case (@getchar(a,46,1)={o} && BINop={Z}
||
@getchar(a,46,1)={o} && BINop={MB}
||
@getchar(a,42,1)={b} && BINop={M} /*葵ネット*/
||
@getchar(a,42,17)<>{-----------------}
&& @getchar(a,26,17)<>{-----------------}
&& BINop={MB} && @getchar(a,42,1)<>{.}
||
BMflag={DEL},
{Yes},
{
case (DelBML={all},
{Yes},
{display({\n}|name|{を削除します\n});
type({D|}|name|{|K|Y\n});
wait (Wtime2,
,{BMAIL},
{type(@getchar(a,2,3)-BNo|{|K\n})}
,{削除},{});BNo:=BNo+1
},
{No},
{
case (DelBML={other} &&
@strip(@head(@getchar(a,6,9),{ }))<>ID,
{Yes},
{display({\n}|name|{を削除します\n});
type({D|}|name|{|K|Y\n});
wait (Wtime2,
,{BMAIL},
{type(@getchar(a,2,3)-BNo|{|K\n})}
,{削除},{});BNo:=BNo+1
},
{No},{type({\n})
});
});
wait (Wtime2,,
{Cannot find}
,{footnote({このファイルは見つかりません})},
{MAIL},,
{失敗},,
{何番を削除しますか},{type({\n})},
{ファイル},{footnote({メールNo.}|@getchar(a,2,3)-BNo|
{番を削除しました})},
{削除},{type({\n});footnote({メールNo.}|
@getchar(a,2,3)-BNo|{番を削除しました})})
},,{footnote({Bメール処理実行中});
})
};
var line [3]; /* 制御ファイル行カウンタ*/
var linebuf [258]; /* 制御文バッファ*/
var BNo[3];BNo:=0; /* BMAIL ナンバー削除調整用*/
var UnDele[3];
case (mopver={Win31},
{Yes},
{case (BINty,
{Z-modem}
,{RecDir(LOG2|{BMAIL})});/*受信ディレクトリの指定*/
});
case (BmalON={Yes} && BINop<>{},{Yes},{downBML});
case (mopver={Win31},
{Yes},
{case (BINty,
{Z-modem}
,{RecDir(FSW)});/*受信ディレクトリの指定*/
});
DOWNSTART;AUTODNLD;